package com.sjq.demo.mapper;

import com.sjq.demo.entity.RbacUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author yer
 * @since 2021-02-26
 */
public interface RbacUserMapper extends BaseMapper<RbacUser> {

    /**
     * 通过用户名和密码登录
     * @param username
     * @param password
     * @return
     */
    @Select("select * from t_rbac_user where username='zhangsan' and password='123456' and flag='0'")
    RbacUser getRbacUserByNameAndPws(@Param("username") String username, @Param("password") String password);

}
